<template>
    <div>
        <div class="crumbs">
            <el-breadcrumb separator="/">
                <el-breadcrumb-item>
                    <i class="el-icon-lx-calendar"></i> 辅助功能
                </el-breadcrumb-item>
                <el-breadcrumb-item>
                    <i class="el-icon-lx-cascades"></i> 任务解锁
                </el-breadcrumb-item>
            </el-breadcrumb>
        </div>
        <div class="container">
            <div>
                <el-form :model="formInline" label-width="100px">

                    <el-row type="flex">
                        <el-col :span="5">
                            <el-form-item label="业务类型">
                                <el-select  placeholder="选择业务类型" style="width: 100%"></el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5" :offset="1">
                            <el-form-item label="业务主键">
                                <el-select  placeholder="选择业务主键" style="width: 100%"></el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5" :offset="1">
                            <el-form-item label="操作员账号">
                                <el-input  placeholder="输入账号" style="width: 100%"></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :span="5" :offset="1">
                            <el-form-item label="操作员姓名">
                                <el-input  placeholder="请输入操作员姓名" style="width: 100%"></el-input>
                            </el-form-item>
                        </el-col>
                    </el-row>

                    <div style="width: 400px;margin: 20px auto;">
                        <el-button type="primary" size="medium">查询</el-button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <el-button type="primary" size="medium">重置</el-button>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    </div>
                </el-form>
            </div>
            <template>
                <div>
                    <el-divider></el-divider>
                </div>
            </template>
            <el-table
                    :data="tableData"
                    border
                    class="table"
                    ref="multipleTable"
                    header-cell-class-name="table-header"
                    style="margin-top: 30px"
            >
                <!--<el-table-column type="selection" width="55" align="center"></el-table-column>-->


                <el-table-column type="index" label="业务类型" width="100px" align="center"></el-table-column>
                <el-table-column prop="data1" label="业务主键"></el-table-column>
                <el-table-column prop="data2" label="所属操作员账号"></el-table-column>
                <el-table-column prop="fangshi" label="所属操作员姓名" width="300px" ></el-table-column>

                <el-table-column label="操作" width="100px">
                    <template slot-scope="scope">
                        <el-button type="primary">解锁</el-button>
                    </template>
                </el-table-column>

            </el-table>
            <div class="pagination">
                <el-pagination
                        background
                        layout="prev, pager, next"
                        :total="1000">
                </el-pagination>
            </div>
        </div>

        <!-- 编辑弹出框 -->
        <el-dialog :visible.sync="editVisible" width="30%">
            <div>报案理赔须知及材料</div>
            <div>该报案理赔仅可申请3000元以下的小额理赔案件，大额案件请拨打400-600-2700进行报案理赔。</div>
            <div>所需材料</div>
            <div>01报保险人出险资料</div>
            <div>①被保险人身份证正反面、病例影像、医疗收据/发票、处方或费用清单照片</div>
            <div>②如是交通事故伤害还需交通事故责任认定书及相关驾驶证、行驶证。</div>
            <div>收款信息资料</div>
            <div>①如收款人是被保险人本人需要银行卡号</div>
            <div>②如收款人是监护人关系需要银行卡号、监护人身份证正反面照片、出险人户口页，出生证明或监护人户口本首页、监护人户口页。</div>
            <div>③如收款人是委托关系需要银行卡号、委托人身份证正反面照片、受托人身份证正反面、委托书照片。</div>
            <span slot="footer" class="dialog-footer">
                <el-button @click="editVisible = false">取 消</el-button>
                <el-button type="primary" @click="saveEdit">继续报案</el-button>
            </span>
        </el-dialog>


        <el-dialog
                title="核赔任务分配"
                :visible.sync="centerDialogVisible"
                width="30%"
                center>
            <div>
                <template>
                    <el-form ref="form" :model="form" label-width="80px">
                        <el-form-item label="活动名称">
                            <el-input v-model="form.name"></el-input>
                        </el-form-item>
                        <el-form-item label="活动区域">
                            <el-select v-model="form.region" placeholder="请选择活动区域">
                                <el-option label="区域一" value="shanghai"></el-option>
                                <el-option label="区域二" value="beijing"></el-option>
                            </el-select>
                        </el-form-item>
                        <el-form-item label="活动时间">
                            <el-col :span="11">
                                <el-date-picker type="date" placeholder="选择日期" v-model="form.date1" style="width: 100%;"></el-date-picker>
                            </el-col>
                            <el-col class="line" :span="2">-</el-col>
                            <el-col :span="11">
                                <el-time-picker placeholder="选择时间" v-model="form.date2" style="width: 100%;"></el-time-picker>
                            </el-col>
                        </el-form-item>
                        <el-form-item label="即时配送">
                            <el-switch v-model="form.delivery"></el-switch>
                        </el-form-item>
                        <el-form-item label="活动性质">
                            <el-checkbox-group v-model="form.type">
                                <el-checkbox label="美食/餐厅线上活动" name="type"></el-checkbox>
                                <el-checkbox label="地推活动" name="type"></el-checkbox>
                                <el-checkbox label="线下主题活动" name="type"></el-checkbox>
                                <el-checkbox label="单纯品牌曝光" name="type"></el-checkbox>
                            </el-checkbox-group>
                        </el-form-item>
                        <el-form-item label="特殊资源">
                            <el-radio-group v-model="form.resource">
                                <el-radio label="线上品牌商赞助"></el-radio>
                                <el-radio label="线下场地免费"></el-radio>
                            </el-radio-group>
                        </el-form-item>
                        <el-form-item label="活动形式">
                            <el-input type="textarea" v-model="form.desc"></el-input>
                        </el-form-item>
                        <el-form-item>
                            <el-button type="primary" @click="onSubmit">立即创建</el-button>
                            <el-button>取消</el-button>
                        </el-form-item>
                    </el-form>
                </template>

            </div>
            <span slot="footer" class="dialog-footer">
            <el-button @click="centerDialogVisible = false">取 消</el-button>
            <el-button type="primary" @click="centerDialogVisible = false">提  交</el-button>
          </span>
        </el-dialog>
    </div>
</template>

<script>
    export default {
        name: 'renwujiesuo',
        data() {
            return {
                redore: true,
                guanzhus: null,
                centerDialogVisible:false,
                query: {
                    address: '',
                    name: '',
                    pageIndex: 1,
                    pageSize: 10
                },
                tableData: [
                    {
                        name:'202188906610',
                        bNo:'012231314',
                        tNo:'012231314',
                        data1:'2021-04-02',
                        data2:'00000157842154',
                        flag:'是',
                        data3:'2021-4-2',
                        fangshi:'45641122788989',
                        name2:'节假日旅游保险',
                        price:'500.00',
                        chuliren: "审核员张三",
                        zhuangt:"城堡医疗",
                        zhifufangshi:"转账",
                        zhifuduixiang:"张全",
                        zhifujiafang:"全运公司",
                        zhifuriqi:"2020-09-12"
                    }
                ],
                multipleSelection: [],
                delList: [],
                editVisible: false,
                pageTotal: 0,
                form: {},
                idx: -1,
                id: -1,
                formInline: {
                    user: '',
                    region: ''
                }
            };
        },
        created() {

        },
        methods: {
            // 删除操作
            handleDelete(index, row) {
                // 二次确认删除
                /* this.$confirm('确定要删除吗？', '提示', {
                     type: 'warning'
                 })
                     .then(() => {
                         this.$message.success('删除成功');
                         this.tableData.splice(index, 1);
                     })
                     .catch(() => {});*/





            },
            // 多选操作
            handleSelectionChange(val) {
                this.multipleSelection = val;
            },
            delAllSelection() {
                const length = this.multipleSelection.length;
                let str = '';
                this.delList = this.delList.concat(this.multipleSelection);
                for (let i = 0; i < length; i++) {
                    str += this.multipleSelection[i].name + ' ';
                }
                this.$message.error(`删除了${str}`);
                this.multipleSelection = [];
            },
            // 编辑操作
            handleEdit(index, row) {
                this.idx = index;
                this.form = row;
                this.editVisible = true;
            },
            // 保存编辑
            saveEdit() {
                this.editVisible = false;
                this.$message.success(`修改第 ${this.idx + 1} 行成功`);
                this.$set(this.tableData, this.idx, this.form);
            },
            onSubmit() {
                console.log('submit!');
            }
        }
    };
</script>

<style scoped>
    .handle-box {
        margin-bottom: 20px;
    }

    .handle-select {
        width: 120px;
    }

    .handle-input {
        width: 300px;
        display: inline-block;
    }
    .table {
        width: 100%;
        font-size: 14px;
    }
    .red {
        color: #ff0000;
    }
    .mr10 {
        margin-right: 10px;
    }
    .table-td-thumb {
        display: block;
        margin: auto;
        width: 40px;
        height: 40px;
    }
</style>